*Figure 14:  Provision Importance by Agreement Levels

use "Data_ImportantProvisions_240423.dta", clear

egen agreement_func_democ = rowsd(func_democ_*_num)
egen agreement_new_democ = rowsd(new_democ_*_num)
egen agreement_divided_democ = rowsd(divided_democ_*_num)

*Scatter plot of agreement vs importance

*Functioning Democracies
preserve
collapse (mean) mean_func_democ agreement_func_democ, by(cat1)
replace agreement_func_democ = agreement_func_democ - 0.005 if cat1 == "Special Sections"
scatter mean_func_democ agreement_func_democ, mcolor(navy) msize(3) xtitle("Disagreement (Standard Deviation)") ytitle("Mean Importance") mlabel(cat1) xlabel(0.8(0.05)1.15) ylabel(2.4(0.4)4.8) title("Provision Importance by Agreement Levels: Functioning Democracies") mlabgap(0.5)
graph export "Figure_14_A.pdf", replace
restore
*New Democracies
preserve
collapse (mean) mean_new_democ agreement_new_democ, by(cat1)
replace mean_new_democ = mean_new_democ + 0.018 if cat1 == "Culture and Identity"
replace mean_new_democ = mean_new_democ - 0.05 if cat1 == "International Law"
replace agreement_new_democ = agreement_new_democ - 0.01 if cat1 == "International Law"
replace mean_new_democ = mean_new_democ + 0.018 if cat1 == "Special Sections"
replace mean_new_democ = mean_new_democ - 0.018 if cat1 == "Judiciary"
replace agreement_new_democ = agreement_new_democ - 0.01 if cat1 == "Principles and Symbols"
scatter mean_new_democ agreement_new_democ, mcolor(forest_green) msize(3) xtitle("Disagreement (Standard Deviation)") ytitle("Mean Importance") mlabel(cat1) mlabpos(3) mlabgap(0.5) xlabel(0.6(0.05)1.35) ylabel(2.4(0.4)4.8) title("Provision Importance by Agreement Levels: New Democracies")
graph export "Figure_14_B.pdf", replace
restore
*Divided Democracies
preserve
collapse (mean) mean_divided_democ agreement_divided_democ, by(cat1)
replace agreement_divided_democ = agreement_divided_democ - 0.03 if cat1 == "Principles and Symbols"
replace mean_divided_democ = mean_divided_democ + 0.04 if cat1 == "Elections"
scatter mean_divided_democ agreement_divided_democ, mcolor(purple) msize(3) xtitle("Disagreement (Standard Deviation)") ytitle("Mean Importance") mlabel(cat1) xlabel(0.6(0.05)1.35) mlabpos(3) mlabgap(0.5) ylabel(2.4(0.4)4.8) title("Provision Importance by Agreement Levels: Divided Democracies")
graph export "Figure_14_C.pdf", replace
restore

